public class test {

   /* public boolean updateMoveById(Integer cid) {
//        redisTemplate.delete(RedisConstant.KEY_NAVIGATION);
        try {
            //根据cid查询 获取对应的排序字段count
            int a=0;
            TabCategory tabCategory = tabCategoryMapper.selectByPrimaryKey(cid);
            Integer count = tabCategory.getCount();
            a=count;
            //根据排序字段count 查询出大于count的下一条数据
            TabCategory nextCategory=tabCategoryMapper.getNextCountByCount(count);
            tabCategory.setCount(nextCategory.getCount());
            //修改下一位的信息为原来的信息
            tabCategoryMapper.updateByPrimaryKeySelective(tabCategory);
            nextCategory.setCount(a);
            //修改原来的为下一位的信息
            tabCategoryMapper.updateByPrimaryKeySelective(nextCategory);
            return true;

        }catch (Exception e){
            // e.printStackTrace();
            return false;
        }

    }
    public boolean updateDownMoveById(Integer cid) {
//        redisTemplate.delete(RedisConstant.KEY_NAVIGATION);
        try {
            //根据cid查询 获取对应的排序字段count
            int a=0;
            TabCategory tabCategory = tabCategoryMapper.selectByPrimaryKey(cid);
            Integer count = tabCategory.getCount();
            a=count;
            //根据排序字段count 查询出大于count的上一条数据Count
            TabCategory lastcategory=tabCategoryMapper.getlastCountByCount(count);
            tabCategory.setCount(lastcategory.getCount());
            //修改下一位的信息为原来的信息
            tabCategoryMapper.updateByPrimaryKeySelective(tabCategory);
            lastcategory.setCount(a);
            //修改原来的为下一位的信息
            tabCategoryMapper.updateByPrimaryKeySelective(lastcategory);
            return true;

        }catch (Exception e){
            //e.printStackTrace();
            return false;

        }
    }

    *//**
     * <!--查出大于cmove的下一条数据-->
     * <select id="getNextCountByCount" resultType="com.dk.pojo.TabCategory">
     *     select * from tab_category where `count` <![CDATA[ > ]]> #{count} order by `count` asc limit 0,1
     * </select>
     *
     * <!--  //查询出小于comve的上一条数据-->
     * <select id="getlastCountByCount" resultType="com.dk.pojo.TabCategory">
     *     select * from tab_category where `count` <![CDATA[ < ]]> #{count} order by `count` desc limit 0,1
     * </select>
     */
}
